package com.link2room.optimus.entity;

import org.hibernate.annotations.DynamicInsert;

import javax.persistence.Basic;
import javax.persistence.Entity;
import java.util.Date;

/**
 * Created by sss on 2017/4/6.
 */
@Entity
@javax.persistence.Table(name = "taobao_xrateplan")
@DynamicInsert
public class TaobaoXrateplan extends BaseRateplan{
    public enum TaobaoXrateplan_{
        rpCode
    }
    private String rpCode;
    private String name;
    private String englishName;
    private Long paymentType;
    private String rpType;
    private Long breakfastCount;
    private Long minDays;
    private Long maxDays;
    private Long minAdvHours;
    private Long maxAdvHours;
    private String startTime;
    private String endTime;
    private Integer cancelPolicyType;
    private Integer cancelPolicyFeeRatio;
    private String cancelPolicyHours;
    private Long guaranteeType;
    private String guaranteeStartTime;
    private String memberLevel;
    private Long occupancy;
    private String channel;
    private Long firstStay;
    private Long agreement;
    private String breakfastCal;
    private String cancelPolicyCal;
    private String guaranteeCal;
    private Date effectiveTime;
    private Date deadlineTime;
    private String vendor;
    private Long minAmount;
    private String hourage;
    private String canCheckinStart;
    private String canCheckinEnd;
    private String superRpFlag;
    private String baseRpFlag;
    private Long isStudent;
    private String guaranteeMode;


    @Basic
    @javax.persistence.Column(name = "rp_code", nullable = false, length = 40)
    public String getRpCode() {
        return rpCode;
    }

    public void setRpCode(String rateplanCode) {
        this.rpCode = rateplanCode;
    }

    @Basic
    @javax.persistence.Column(name = "name", nullable = true, length = 30)
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }


    @Basic
    @javax.persistence.Column(name = "english_name", nullable = true, length = 30)
    public String getEnglishName() {
        return englishName;
    }

    public void setEnglishName(String englishName) {
        this.englishName = englishName;
    }

    @Basic
    @javax.persistence.Column(name = "payment_type", nullable = false)
    public Long getPaymentType() {
        return paymentType;
    }

    public void setPaymentType(Long paymentType) {
        this.paymentType = paymentType;
    }

    @Basic
    @javax.persistence.Column(name = "rp_type", nullable = true, length = 10)
    public String getRpType() {
        return rpType;
    }

    public void setRpType(String rpType) {
        this.rpType = rpType;
    }

    @Basic
    @javax.persistence.Column(name = "breakfast_count", nullable = true)
    public Long getBreakfastCount() {
        return breakfastCount;
    }

    public void setBreakfastCount(Long breakfastCount) {
        this.breakfastCount = breakfastCount;
    }

    @Basic
    @javax.persistence.Column(name = "min_days", nullable = true)
    public Long getMinDays() {
        return minDays;
    }

    public void setMinDays(Long minDays) {
        this.minDays = minDays;
    }

    @Basic
    @javax.persistence.Column(name = "max_days", nullable = true)
    public Long getMaxDays() {
        return maxDays;
    }

    public void setMaxDays(Long maxDays) {
        this.maxDays = maxDays;
    }

    @Basic
    @javax.persistence.Column(name = "min_adv_hours", nullable = true)
    public Long getMinAdvHours() {
        return minAdvHours;
    }

    public void setMinAdvHours(Long minAdvHours) {
        this.minAdvHours = minAdvHours;
    }

    @Basic
    @javax.persistence.Column(name = "max_adv_hours", nullable = true)
    public Long getMaxAdvHours() {
        return maxAdvHours;
    }

    public void setMaxAdvHours(Long maxAdvHours) {
        this.maxAdvHours = maxAdvHours;
    }

    @Basic
    @javax.persistence.Column(name = "start_time", nullable = true, length = 6)
    public String getStartTime() {
        return startTime;
    }

    public void setStartTime(String startTime) {
        this.startTime = startTime;
    }

    @Basic
    @javax.persistence.Column(name = "end_time", nullable = true, length = 6)
    public String getEndTime() {
        return endTime;
    }

    public void setEndTime(String endTime) {
        this.endTime = endTime;
    }

    @Basic
    @javax.persistence.Column(name = "cancel_policy_type", nullable = true)
    public Integer getCancelPolicyType() {
        return cancelPolicyType;
    }

    public void setCancelPolicyType(Integer cancelPolicyType) {
        this.cancelPolicyType = cancelPolicyType;
    }

    @Basic
    @javax.persistence.Column(name = "cancel_policy_hours", nullable = true, length = 4)
    public String getCancelPolicyHours() {
        return cancelPolicyHours;
    }

    public void setCancelPolicyHours(String cancelPolicyHours) {
        this.cancelPolicyHours = cancelPolicyHours;
    }

    @Basic
    @javax.persistence.Column(name = "cancel_policy_fee_ratio", nullable = true)
    public Integer getCancelPolicyFeeRatio() {
        return cancelPolicyFeeRatio;
    }

    public void setCancelPolicyFeeRatio(Integer cancelPolicyFeeRatio) {
        this.cancelPolicyFeeRatio = cancelPolicyFeeRatio;
    }

    @Basic
    @javax.persistence.Column(name = "guarantee_type", nullable = true)
    public Long getGuaranteeType() {
        return guaranteeType;
    }

    public void setGuaranteeType(Long guaranteeType) {
        this.guaranteeType = guaranteeType;
    }

    @Basic
    @javax.persistence.Column(name = "guarantee_start_time", nullable = true, length = 6)
    public String getGuaranteeStartTime() {
        return guaranteeStartTime;
    }

    public void setGuaranteeStartTime(String guaranteeStartTime) {
        this.guaranteeStartTime = guaranteeStartTime;
    }

    @Basic
    @javax.persistence.Column(name = "member_level", nullable = true, length = 5)
    public String getMemberLevel() {
        return memberLevel;
    }

    public void setMemberLevel(String memberLevel) {
        this.memberLevel = memberLevel;
    }

    @Basic
    @javax.persistence.Column(name = "occupancy", nullable = true)
    public Long getOccupancy() {
        return occupancy;
    }

    public void setOccupancy(Long occupancy) {
        this.occupancy = occupancy;
    }

    @Basic
    @javax.persistence.Column(name = "channel", nullable = true, length = 3)
    public String getChannel() {
        return channel;
    }

    public void setChannel(String channel) {
        this.channel = channel;
    }

    @Basic
    @javax.persistence.Column(name = "first_stay", nullable = true)
    public Long getFirstStay() {
        return firstStay;
    }

    public void setFirstStay(Long firstStay) {
        this.firstStay = firstStay;
    }

    @Basic
    @javax.persistence.Column(name = "agreement", nullable = true)
    public Long getAgreement() {
        return agreement;
    }

    public void setAgreement(Long agreement) {
        this.agreement = agreement;
    }

    @Basic
    @javax.persistence.Column(name = "breakfast_cal", nullable = true, length = 5000)
    public String getBreakfastCal() {
        return breakfastCal;
    }

    public void setBreakfastCal(String breakfastCal) {
        this.breakfastCal = breakfastCal;
    }

    @Basic
    @javax.persistence.Column(name = "cancel_policy_cal", nullable = true, length = 5000)
    public String getCancelPolicyCal() {
        return cancelPolicyCal;
    }

    public void setCancelPolicyCal(String cancelPolicyCal) {
        this.cancelPolicyCal = cancelPolicyCal;
    }

    @Basic
    @javax.persistence.Column(name = "guarantee_cal", nullable = true, length = 5000)
    public String getGuaranteeCal() {
        return guaranteeCal;
    }

    public void setGuaranteeCal(String guaranteeCal) {
        this.guaranteeCal = guaranteeCal;
    }

    @Basic
    @javax.persistence.Column(name = "effective_time", nullable = true)
    public Date getEffectiveTime() {
        return effectiveTime;
    }

    public void setEffectiveTime(Date effectiveTime) {
        this.effectiveTime = effectiveTime;
    }

    @Basic
    @javax.persistence.Column(name = "deadline_time", nullable = true)
    public Date getDeadlineTime() {
        return deadlineTime;
    }

    public void setDeadlineTime(Date deadlineTime) {
        this.deadlineTime = deadlineTime;
    }

    @Basic
    @javax.persistence.Column(name = "vendor", nullable = true, length = 10)
    public String getVendor() {
        return vendor;
    }

    public void setVendor(String vendor) {
        this.vendor = vendor;
    }

    @Basic
    @javax.persistence.Column(name = "min_amount", nullable = true)
    public Long getMinAmount() {
        return minAmount;
    }

    public void setMinAmount(Long minAmount) {
        this.minAmount = minAmount;
    }

    @Basic
    @javax.persistence.Column(name = "hourage", nullable = true, length = 2)
    public String getHourage() {
        return hourage;
    }

    public void setHourage(String hourage) {
        this.hourage = hourage;
    }

    @Basic
    @javax.persistence.Column(name = "can_checkin_start", nullable = true, length = 6)
    public String getCanCheckinStart() {
        return canCheckinStart;
    }

    public void setCanCheckinStart(String canCheckinStart) {
        this.canCheckinStart = canCheckinStart;
    }

    @Basic
    @javax.persistence.Column(name = "can_checkin_end", nullable = true, length = 6)
    public String getCanCheckinEnd() {
        return canCheckinEnd;
    }

    public void setCanCheckinEnd(String canCheckinEnd) {
        this.canCheckinEnd = canCheckinEnd;
    }

    @Basic
    @javax.persistence.Column(name = "super_rp_flag", nullable = true, length = 2)
    public String getSuperRpFlag() {
        return superRpFlag;
    }

    public void setSuperRpFlag(String superRpFlag) {
        this.superRpFlag = superRpFlag;
    }

    @Basic
    @javax.persistence.Column(name = "base_rp_flag", nullable = true, length = 2)
    public String getBaseRpFlag() {
        return baseRpFlag;
    }

    public void setBaseRpFlag(String baseRpFlag) {
        this.baseRpFlag = baseRpFlag;
    }

    @Basic
    @javax.persistence.Column(name = "is_student", nullable = true)
    public Long getIsStudent() {
        return isStudent;
    }

    public void setIsStudent(Long isStudent) {
        this.isStudent = isStudent;
    }

    @Basic
    @javax.persistence.Column(name = "guarantee_mode", nullable = true, length = 2)
    public String getGuaranteeMode() {
        return guaranteeMode;
    }

    public void setGuaranteeMode(String guaranteeMode) {
        this.guaranteeMode = guaranteeMode;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        TaobaoXrateplan that = (TaobaoXrateplan) o;

        if (rpCode != null ? !rpCode.equals(that.rpCode) : that.rpCode != null) return false;
        if (name != null ? !name.equals(that.name) : that.name != null) return false;
        if (englishName != null ? !englishName.equals(that.englishName) : that.englishName != null) return false;
        if (paymentType != null ? !paymentType.equals(that.paymentType) : that.paymentType != null) return false;
        if (rpType != null ? !rpType.equals(that.rpType) : that.rpType != null) return false;
        if (breakfastCount != null ? !breakfastCount.equals(that.breakfastCount) : that.breakfastCount != null)
            return false;
        if (minDays != null ? !minDays.equals(that.minDays) : that.minDays != null) return false;
        if (maxDays != null ? !maxDays.equals(that.maxDays) : that.maxDays != null) return false;
        if (minAdvHours != null ? !minAdvHours.equals(that.minAdvHours) : that.minAdvHours != null) return false;
        if (maxAdvHours != null ? !maxAdvHours.equals(that.maxAdvHours) : that.maxAdvHours != null) return false;
        if (startTime != null ? !startTime.equals(that.startTime) : that.startTime != null) return false;
        if (endTime != null ? !endTime.equals(that.endTime) : that.endTime != null) return false;
        if (cancelPolicyType != null ? !cancelPolicyType.equals(that.cancelPolicyType) : that.cancelPolicyType != null)
            return false;
        if (cancelPolicyFeeRatio != null ? !cancelPolicyFeeRatio.equals(that.cancelPolicyFeeRatio) : that.cancelPolicyFeeRatio != null)
            return false;
        if (cancelPolicyHours != null ? !cancelPolicyHours.equals(that.cancelPolicyHours) : that.cancelPolicyHours != null)
            return false;
        if (guaranteeType != null ? !guaranteeType.equals(that.guaranteeType) : that.guaranteeType != null)
            return false;
        if (guaranteeStartTime != null ? !guaranteeStartTime.equals(that.guaranteeStartTime) : that.guaranteeStartTime != null)
            return false;
        if (memberLevel != null ? !memberLevel.equals(that.memberLevel) : that.memberLevel != null) return false;
        if (occupancy != null ? !occupancy.equals(that.occupancy) : that.occupancy != null) return false;
        if (channel != null ? !channel.equals(that.channel) : that.channel != null) return false;
        if (firstStay != null ? !firstStay.equals(that.firstStay) : that.firstStay != null) return false;
        if (agreement != null ? !agreement.equals(that.agreement) : that.agreement != null) return false;
        if (breakfastCal != null ? !breakfastCal.equals(that.breakfastCal) : that.breakfastCal != null) return false;
        if (cancelPolicyCal != null ? !cancelPolicyCal.equals(that.cancelPolicyCal) : that.cancelPolicyCal != null)
            return false;
        if (guaranteeCal != null ? !guaranteeCal.equals(that.guaranteeCal) : that.guaranteeCal != null) return false;
        if (effectiveTime != null ? !effectiveTime.equals(that.effectiveTime) : that.effectiveTime != null)
            return false;
        if (deadlineTime != null ? !deadlineTime.equals(that.deadlineTime) : that.deadlineTime != null) return false;
        if (vendor != null ? !vendor.equals(that.vendor) : that.vendor != null) return false;
        if (minAmount != null ? !minAmount.equals(that.minAmount) : that.minAmount != null) return false;
        if (hourage != null ? !hourage.equals(that.hourage) : that.hourage != null) return false;
        if (canCheckinStart != null ? !canCheckinStart.equals(that.canCheckinStart) : that.canCheckinStart != null)
            return false;
        if (canCheckinEnd != null ? !canCheckinEnd.equals(that.canCheckinEnd) : that.canCheckinEnd != null)
            return false;
        if (superRpFlag != null ? !superRpFlag.equals(that.superRpFlag) : that.superRpFlag != null) return false;
        if (baseRpFlag != null ? !baseRpFlag.equals(that.baseRpFlag) : that.baseRpFlag != null) return false;
        if (isStudent != null ? !isStudent.equals(that.isStudent) : that.isStudent != null) return false;
        return guaranteeMode != null ? guaranteeMode.equals(that.guaranteeMode) : that.guaranteeMode == null;

    }

    @Override
    public int hashCode() {
        int result = rpCode != null ? rpCode.hashCode() : 0;
        result = 31 * result + (name != null ? name.hashCode() : 0);
        result = 31 * result + (englishName != null ? englishName.hashCode() : 0);
        result = 31 * result + (paymentType != null ? paymentType.hashCode() : 0);
        result = 31 * result + (rpType != null ? rpType.hashCode() : 0);
        result = 31 * result + (breakfastCount != null ? breakfastCount.hashCode() : 0);
        result = 31 * result + (minDays != null ? minDays.hashCode() : 0);
        result = 31 * result + (maxDays != null ? maxDays.hashCode() : 0);
        result = 31 * result + (minAdvHours != null ? minAdvHours.hashCode() : 0);
        result = 31 * result + (maxAdvHours != null ? maxAdvHours.hashCode() : 0);
        result = 31 * result + (startTime != null ? startTime.hashCode() : 0);
        result = 31 * result + (endTime != null ? endTime.hashCode() : 0);
        result = 31 * result + (cancelPolicyType != null ? cancelPolicyType.hashCode() : 0);
        result = 31 * result + (cancelPolicyFeeRatio != null ? cancelPolicyFeeRatio.hashCode() : 0);
        result = 31 * result + (cancelPolicyHours != null ? cancelPolicyHours.hashCode() : 0);
        result = 31 * result + (guaranteeType != null ? guaranteeType.hashCode() : 0);
        result = 31 * result + (guaranteeStartTime != null ? guaranteeStartTime.hashCode() : 0);
        result = 31 * result + (memberLevel != null ? memberLevel.hashCode() : 0);
        result = 31 * result + (occupancy != null ? occupancy.hashCode() : 0);
        result = 31 * result + (channel != null ? channel.hashCode() : 0);
        result = 31 * result + (firstStay != null ? firstStay.hashCode() : 0);
        result = 31 * result + (agreement != null ? agreement.hashCode() : 0);
        result = 31 * result + (breakfastCal != null ? breakfastCal.hashCode() : 0);
        result = 31 * result + (cancelPolicyCal != null ? cancelPolicyCal.hashCode() : 0);
        result = 31 * result + (guaranteeCal != null ? guaranteeCal.hashCode() : 0);
        result = 31 * result + (effectiveTime != null ? effectiveTime.hashCode() : 0);
        result = 31 * result + (deadlineTime != null ? deadlineTime.hashCode() : 0);
        result = 31 * result + (vendor != null ? vendor.hashCode() : 0);
        result = 31 * result + (minAmount != null ? minAmount.hashCode() : 0);
        result = 31 * result + (hourage != null ? hourage.hashCode() : 0);
        result = 31 * result + (canCheckinStart != null ? canCheckinStart.hashCode() : 0);
        result = 31 * result + (canCheckinEnd != null ? canCheckinEnd.hashCode() : 0);
        result = 31 * result + (superRpFlag != null ? superRpFlag.hashCode() : 0);
        result = 31 * result + (baseRpFlag != null ? baseRpFlag.hashCode() : 0);
        result = 31 * result + (isStudent != null ? isStudent.hashCode() : 0);
        result = 31 * result + (guaranteeMode != null ? guaranteeMode.hashCode() : 0);
        return result;
    }

    @Override
    public String toString() {
        return "TaobaoXrateplan{" +
                "rpCode='" + rpCode + '\'' +
                ", name='" + name + '\'' +
                ", englishName='" + englishName + '\'' +
                ", paymentType=" + paymentType +
                ", rpType='" + rpType + '\'' +
                ", breakfastCount=" + breakfastCount +
                ", minDays=" + minDays +
                ", maxDays=" + maxDays +
                ", minAdvHours=" + minAdvHours +
                ", maxAdvHours=" + maxAdvHours +
                ", startTime='" + startTime + '\'' +
                ", endTime='" + endTime + '\'' +
                ", cancelPolicyType=" + cancelPolicyType +
                ", cancelPolicyFeeRatio=" + cancelPolicyFeeRatio +
                ", cancelPolicyHours='" + cancelPolicyHours + '\'' +
                ", guaranteeType=" + guaranteeType +
                ", guaranteeStartTime='" + guaranteeStartTime + '\'' +
                ", memberLevel='" + memberLevel + '\'' +
                ", occupancy=" + occupancy +
                ", channel='" + channel + '\'' +
                ", firstStay=" + firstStay +
                ", agreement=" + agreement +
                ", breakfastCal='" + breakfastCal + '\'' +
                ", cancelPolicyCal='" + cancelPolicyCal + '\'' +
                ", guaranteeCal='" + guaranteeCal + '\'' +
                ", effectiveTime=" + effectiveTime +
                ", deadlineTime=" + deadlineTime +
                ", vendor='" + vendor + '\'' +
                ", minAmount=" + minAmount +
                ", hourage='" + hourage + '\'' +
                ", canCheckinStart='" + canCheckinStart + '\'' +
                ", canCheckinEnd='" + canCheckinEnd + '\'' +
                ", superRpFlag='" + superRpFlag + '\'' +
                ", baseRpFlag='" + baseRpFlag + '\'' +
                ", isStudent=" + isStudent +
                ", guaranteeMode='" + guaranteeMode + '\'' +
                '}';
    }
}
